// ml:run = $bin < input
#include <iostream>
#include <string>
#include <set>

int const maxn = 200;
int a[maxn];
int n;

int main()
{
    std::ios_base::sync_with_stdio(false);
    bool ok = true;
    std::cin >> n;
    std::set<char> all{'a', 'e', 'i', 'o', 'u', 'y'};
    for (int i = 0; i < n; i++) std::cin >> a[i];
    std::string s;
    std::getline(std::cin, s);
    for (int i = 0; i < n; i++) {
        std::getline(std::cin, s);
        int count = 0;
        for (auto & ch : s)
            if (all.count(ch)) count++;
        if (count != a[i]) ok = false;
    }
    std::cout << (ok ? "YES" : "NO") << "\n";
}

